﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Popup_Vehice.aspx.cs" MasterPageFile="~/Popup.Master"
    Inherits="SAP.Popup_Vehice" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <script type="text/javascript" src="/js/jquery-1.4.3.min.js"></script>
    <script type="text/javascript" src="/js/main.js"></script>
    <script type="text/javascript">
        function RefreshUpdatePanel() {

        };


        function transferData() {
            window.parent.document.getElementById('hf_VehicleID').value = document.getElementById('hf_VehicleID').value;
            window.parent.document.getElementById('txt_VIN').value = document.getElementById('txt_VIN').value;
            window.parent.document.getElementById('txt_RegNo').value = document.getElementById('txt_RegNo').value;
            window.parent.document.getElementById('txt_EngineNo').value = document.getElementById('txt_EngineNo').value;
            window.parent.document.getElementById('txt_Model').value = document.getElementById('txt_Model').value;
            window.parent.document.getElementById('txt_ColorCode').value = document.getElementById('txt_ColorCode').value;
            window.parent.document.getElementById('txt_Brand').value = document.getElementById('txt_Brand').value;
            window.parent.document.getElementById('txt_VehicleName').value = document.getElementById('txt_VehicleName').value;

            window.parent.document.getElementById('hf_CustomerCode').value = document.getElementById('hf_CustomerCode').value;
            window.parent.document.getElementById('txt_CustomerName').value = document.getElementById('hf_CustomerName').value;
            window.parent.document.getElementById('txt_OtherName').value = document.getElementById('hf_OtherName').value;
            window.parent.document.getElementById('txt_Address').value = document.getElementById('hf_Address').value;
            window.parent.document.getElementById('txt_Tel').value = document.getElementById('hf_Tel').value;
            window.parent.document.getElementById('txt_TaxCode').value = document.getElementById('hf_TaxCode').value;
            window.parent.document.getElementById('txt_ContactPerson').value = document.getElementById('hf_ContactPerson').value;
            window.parent.document.getElementById('txt_PhoneContact').value = document.getElementById('hf_PhoneContact').value;

            return Main.cancelDialogClick();
        }
    </script>
    <div>
        <asp:UpdatePanel ID="editItemUpdatePanel" runat="server" UpdateMode="Conditional"
            ChildrenAsTriggers="True">
            <ContentTemplate>
                <span class="style1">Vehicle</span><br />
                <table border="0" width="100%">
                    <tr>
                        <td style="width: 50%">
                            <table border="0" width="100%" style="background-color: #C9DBF2;">
                                <tr>
                                    <td style="width: 15%" class="FormLineItemAlt">
                                        VIN
                                    </td>
                                    <td style="width: 35%" class="FormLineItemAlt">
                                        <asp:TextBox ID="txt_VIN" runat="server" Width="70%" ClientIDMode="Static"></asp:TextBox>
                                        <asp:Button ID="btn_Search" runat="server" BackColor="#1B7FC2" ForeColor="#FFFFFF"
                                            Height="22px" OnClick="btn_Search_Click" Text="..." Width="18%" />
                                    </td>
                                    <td style="width: 15%" class="FormLineItemAlt">
                                        Invoice Date
                                    </td>
                                    <td style="width: 35%" class="FormLineItemAlt">
                                        <asp:TextBox ID="txt_InvoiceDate" runat="server" AutoPostBack="True" 
                                            ClientIDMode="Static"></asp:TextBox>
                                        <cc1:CalendarExtender ID="txt_InvoiceDate_CalendarExtender" runat="server" Format="dd/MM/yyyy"
                                            PopupButtonID="ImageButton5" TargetControlID="txt_InvoiceDate">
                                        </cc1:CalendarExtender>
                                        <asp:ImageButton ID="ImageButton5" runat="Server" AlternateText="Click to show calendar"
                                            ImageUrl="~/Images/Calendar_scheduleHS.png" />
                                    </td>
                                </tr>
                                <tr>
                                    <td style="width: 15%" class="FormLineItemAlt">
                                        Reg No.
                                    </td>
                                    <td style="width: 35%" class="FormLineItemAlt">
                                        <asp:TextBox ID="txt_RegNo" runat="server" Width="70%" ClientIDMode="Static"></asp:TextBox>
                                        <asp:Button ID="btn_SearchRegNo" runat="server" BackColor="#1B7FC2" ForeColor="#FFFFFF"
                                            Height="22px" Text="..." Width="18%" OnClick="btn_SearchRegNo_Click" />
                                    </td>
                                    <td style="width: 15%" class="FormLineItemAlt">
                                        Dealer
                                    </td>
                                    <td style="width: 35%" class="FormLineItemAlt">
                                        <asp:TextBox ID="txt_Dealer" runat="server" Width="90%" ClientIDMode="Static"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="width: 15%" class="FormLineItemAlt">
                                        Vehicle Name
                                    </td>
                                    <td style="width: 35%" class="FormLineItemAlt">
                                        <asp:TextBox ID="txt_VehicleName" runat="server" Width="90%" 
                                            ClientIDMode="Static"></asp:TextBox>
                                    </td>
                                    <td style="width: 15%" class="FormLineItemAlt">
                                        Color Code
                                    </td>
                                    <td style="width: 35%" class="FormLineItemAlt">
                                        <asp:TextBox ID="txt_ColorCode" runat="server" Width="90%" 
                                            ClientIDMode="Static"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="width: 15%" class="FormLineItemAlt">
                                        Engine No.
                                    </td>
                                    <td style="width: 35%" class="FormLineItemAlt">
                                        <asp:TextBox ID="txt_EngineNo" runat="server" Width="90%" ClientIDMode="Static"></asp:TextBox>
                                    </td>
                                    <td style="width: 15%" class="FormLineItemAlt">
                                        Customer Code
                                    </td>
                                    <td style="width: 35%" class="FormLineItemAlt">
                                        <asp:TextBox ID="txt_CustomerCode" runat="server" Width="90%" 
                                            ClientIDMode="Static"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="width: 15%" class="FormLineItemAlt">
                                        Brand
                                    </td>
                                    <td style="width: 35%" class="FormLineItemAlt">
                                        <asp:TextBox ID="txt_Brand" runat="server" Width="90%" ClientIDMode="Static"></asp:TextBox>
                                    </td>
                                    <td style="width: 15%" class="FormLineItemAlt">
                                        Customer Name
                                    </td>
                                    <td style="width: 35%" class="FormLineItemAlt">
                                        <asp:TextBox ID="txt_CustomerName" runat="server" Width="90%" 
                                            ClientIDMode="Static"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="width: 15%" class="FormLineItemAlt">
                                        Key No.
                                    </td>
                                    <td style="width: 35%" class="FormLineItemAlt">
                                        <asp:TextBox ID="txt_KeyNo" runat="server" Width="90%" ClientIDMode="Static"></asp:TextBox>
                                    </td>
                                    <td class="FormLineItemAlt" style="width: 15%">
                                        Lot No.
                                    </td>
                                    <td class="FormLineItemAlt" style="width: 35%">
                                        <asp:TextBox ID="txt_LotNo" runat="server" Width="90%" ClientIDMode="Static"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="width: 15%" class="FormLineItemAlt">
                                        Model Code
                                    </td>
                                    <td style="width: 35%" class="FormLineItemAlt">
                                        <asp:TextBox ID="txt_Model" runat="server" Width="90%" ClientIDMode="Static"></asp:TextBox>
                                    </td>
                                    <td class="FormLineItemAlt" style="width: 15%">
                                        Comment
                                    </td>
                                    <td class="FormLineItemAlt" style="width: 35%" rowspan="3">
                                        <asp:TextBox ID="txt_Remarks" runat="server" Height="70px" TextMode="MultiLine" 
                                            Width="90%" ClientIDMode="Static"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="width: 15%" class="FormLineItemAlt">
                                        Production Date
                                    </td>
                                    <td style="width: 35%" class="FormLineItemAlt">
                                        <asp:TextBox ID="txt_ProdDate" runat="server" AutoPostBack="True" 
                                            ClientIDMode="Static"></asp:TextBox>
                                        <asp:ImageButton ID="Image1" runat="Server" AlternateText="Click to show calendar"
                                            ImageUrl="~/Images/Calendar_scheduleHS.png" />
                                        <cc1:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txt_ProdDate"
                                            PopupButtonID="Image1" Format="dd/MM/yyyy">
                                        </cc1:CalendarExtender>
                                    </td>
                                    <td class="FormLineItemAlt" style="width: 15%">
                                        &nbsp;
                                    </td>
                                </tr>
                                <tr>
                                    <td style="width: 15%" class="FormLineItemAlt">
                                        PDI Date
                                    </td>
                                    <td style="width: 35%" class="FormLineItemAlt">
                                        <asp:TextBox ID="txt_PDIDate" runat="server" AutoPostBack="True" 
                                            ClientIDMode="Static"></asp:TextBox>
                                        <cc1:CalendarExtender ID="txt_PDIDate_CalendarExtender" runat="server" Format="dd/MM/yyyy"
                                            PopupButtonID="ImageButton4" TargetControlID="txt_PDIDate">
                                        </cc1:CalendarExtender>
                                        <asp:ImageButton ID="ImageButton4" runat="Server" AlternateText="Click to show calendar"
                                            ImageUrl="~/Images/Calendar_scheduleHS.png" />
                                    </td>
                                    <td style="width: 15%" class="FormLineItemAlt">
                                        &nbsp;
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
                <table border="0" width="100%">
                    <tr>
                        <td>
                            <asp:Button ID="btn_New" runat="server" BackColor="#1B7FC2" ForeColor="#FFFFFF" Height="30px"
                                Text="New" Width="90px" OnClick="btn_New_Click" />
                            <asp:Button ID="btn_Modify" runat="server" BackColor="#1B7FC2" ForeColor="#FFFFFF"
                                Height="30px" Text="Modify" Width="90px" OnClick="btn_Save_Click" />
                            <asp:Button ID="btn_Save" runat="server" BackColor="#1B7FC2" ForeColor="#FFFFFF"
                                Height="30px" OnClick="btn_Save_Click" Text="Save" Width="90px" />
                            <asp:Button ID="btn_Accept" runat="server" BackColor="#1B7FC2" ForeColor="#FFFFFF"
                                Height="30px" Text="Choose" Width="90px" OnClientClick="transferData();" />
                            <asp:Button ID="btn_Cancel" runat="server" BackColor="#1B7FC2" ForeColor="#FFFFFF"
                                Height="30px" OnClientClick="return Main.cancelDialogClick()" Text="Cancel" Width="90px" />
                            <asp:HiddenField ID="hf_VehicleID" runat="server" ClientIDMode="Static" />
                            <asp:HiddenField ID="hf_CustomerCode" runat="server" ClientIDMode="Static" />
                            <asp:HiddenField ID="hf_CustomerName" runat="server" ClientIDMode="Static" />
                            <asp:HiddenField ID="hf_OtherName" runat="server" ClientIDMode="Static" />
                            <asp:HiddenField ID="hf_Address" runat="server" ClientIDMode="Static" />
                            <asp:HiddenField ID="hf_Tel" runat="server" ClientIDMode="Static" />
                            <asp:HiddenField ID="hf_TaxCode" runat="server" ClientIDMode="Static" />
                            <asp:HiddenField ID="hf_ContactPerson" runat="server" ClientIDMode="Static" />
                            <asp:HiddenField ID="hf_PhoneContact" runat="server" ClientIDMode="Static" />
                            <asp:HiddenField ID="hf_Notice" runat="server" ClientIDMode="Static" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lb_Message" runat="server" Text="[]"></asp:Label>
                        </td>
                    </tr>
                </table>
                <%--
            <div ID="action-form">
               <asp:ImageButton ID="btnAdd" runat="server" 
                    ImageUrl="~/skin/images/SAP_choose.png" OnClick="btnAdd_Click" />
                <asp:ImageButton ID="btnCancel" runat="server" 
                    ImageUrl="~/skin/images/SAP_cancel.png" 
                    OnClientClick="return Main.cancelDialogClick()" />
            </div>--%>
            </ContentTemplate>
            <Triggers>
                <%-- <asp:PostBackTrigger  ControlID="btnFilter" />--%>
                <%--  <asp:PostBackTrigger  ControlID="txtFilter" />--%>
            </Triggers>
        </asp:UpdatePanel>
    </div>
</asp:Content>
